An Averaging filter is a commonly used filter in the field of image processing and is mainly used for removing any noise in a given image. A noise in an image is any presence of pixel values which doesn’t blend well with the actual content of photo like salt-pepper grains on an image. Averaging filter makes use of the concept that any given pixel value will not change drastically from its immediate neighbors. In other words, the current value of a pixel depends more on its immediate neighbors. Averaging filter size decides how many immediate neighbors are considered for the computation of the current pixel values. Most commonly used filter size 3x3.

This sample demonstrates how to increase the performance of Averaging filter using Intel(R) SIMD Data Layout Templates (Intel(R) SDLT). Intel(R) SDLT library provides an Array of Structure interface to the user but stores the data in Structure of Array format in memory.

System Requirements:

Performance Data

Speedup Compiler (Intel® 64) Compiler options System specifications
SDLT version: 3.3x Intel® Parallel Studio XE 2019 Composer Edition for C++ Windows* /Qrestrict /QxCORE-AVX2 /O2 /Qstd=c++11
Windows 10 PRO
Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
16GB memory
SDLT version: 2.9x Intel® Parallel Studio XE 2019 Composer Edition for C++ Linux* -restrict -xCORE-AVX2 -O2 -std=c++11
Red Hat Enterprise Linux Server 7.2
Intel(R) Xeon(R) E5-2699 v3 @ 2.30GHz
8GB memory

Build Instructions

For Microsoft* Visual Studio users:
For Windows Command Line users:
For Linux*/macOS* users: